package com.create.rdjc.jdbc;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class SqlModel {
    private Properties properties = new Properties();

    public SqlModel(String sqlPath){
        InputStream in = this.getClass().getClassLoader().getResourceAsStream(sqlPath);
        try {
            properties.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    /**
     * name properties key
     * @param name
     */
    public String getSql(String name){
        return properties.get(name).toString() ;
    }

}
